﻿<Page
    x:Class="Philosophy.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Philosophy"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
   mc:Ignorable="d">

    <Page.Resources>
        <CollectionViewSource 
            x:Name="cvsMain" 
            IsSourceGrouped="true" 
            ItemsPath="Items">
        </CollectionViewSource>
    </Page.Resources>
    <ScrollViewer Height="768" Width="1366" ZoomMode="Enabled"  HorizontalAlignment="Left" HorizontalScrollMode="Enabled" HorizontalScrollBarVisibility="Visible"  VerticalScrollMode="Disabled" VerticalScrollBarVisibility="Hidden">
        <Grid Style="{StaticResource LayoutRootStyle}" HorizontalAlignment="Left" Width="2231">
       
        <Grid.Background>
            <ImageBrush ImageSource="Assets/3.jpg"/>
        </Grid.Background>
        
        <TextBlock HorizontalAlignment="Left" Height="86" Margin="54,32,0,0" TextWrapping="Wrap" Text="VICTORINA" VerticalAlignment="Top" Width="202" FontSize="36"/>
        <GridView x:Name="gvMain"
                  
                  Height="554" 
                  Margin="117,123,96,0"
                  VerticalAlignment="Top" 
                 SelectionMode="Single"
                  ScrollViewer.HorizontalScrollMode="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.IsHorizontalRailEnabled="False"
                  ItemsSource="{Binding Source={StaticResource cvsMain}}" SelectionChanged="gvMain_SelectionChanged" IsSynchronizedWithCurrentItem="False">

            <GridView.ItemTemplate>
                <DataTemplate>
                        <Grid Style="{StaticResource LayoutRootStyle}" HorizontalAlignment="Left" Width="350" Height="220" ScrollViewer.HorizontalScrollMode="Disabled">
                        <Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}">
                            <Image  Stretch="Fill" Source="{Binding ImageAdress}"/>
                        </Border>
                        <StackPanel VerticalAlignment="Bottom" Background="{Binding Color}">
                            <TextBlock Text="{Binding Name_Item}" Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource TitleTextStyle}" Margin="15,0,15,8"/>
                        </StackPanel>
                    </Grid>
                </DataTemplate>
            </GridView.ItemTemplate>

            <GridView.GroupStyle>
                <GroupStyle>
                    <GroupStyle.HeaderTemplate>
                        <DataTemplate>
                                <Grid Margin="1,0,0,6" ScrollViewer.HorizontalScrollMode="Disabled">
                                <Button Style="{StaticResource TextPrimaryButtonStyle}" >
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="{Binding Group_Name}" Margin="3,3,10,10" Style="{StaticResource GroupHeaderTextStyle}" FontSize="25" />
                                        <TextBlock Text="{StaticResource ChevronGlyph}" FontFamily="Segoe UI Symbol" Margin="0,2,0,10" Style="{StaticResource GroupHeaderTextStyle}"/>
                                    </StackPanel>
                                </Button>
                            </Grid>
                        </DataTemplate>
                    </GroupStyle.HeaderTemplate>
                    <GroupStyle.Panel>
                        <ItemsPanelTemplate>
                            <VariableSizedWrapGrid Orientation="Vertical" Margin="0,0,80,0"/>
                        </ItemsPanelTemplate>
                    </GroupStyle.Panel>
                </GroupStyle>
            </GridView.GroupStyle>

            <GridView.ItemsPanel>
                <ItemsPanelTemplate>
                    <VirtualizingStackPanel Orientation="Horizontal"/>
                </ItemsPanelTemplate>
            </GridView.ItemsPanel>

        </GridView>
       
    </Grid>
    </ScrollViewer>
</Page>
